package com.link.serve.kafka.coder;

import com.link.serve.kafka.proto.KafkaMessageProto;
import org.apache.kafka.common.serialization.Serializer;

import java.util.Map;

public class KafkaMessageSerializer implements Serializer<KafkaMessageProto.KafkaMessage> {

    @Override
    public void configure(Map<String, ?> configs, boolean isKey) {}

    @Override
    public byte[] serialize(String topic, KafkaMessageProto.KafkaMessage data) {
        return data.toByteArray();
    }

    @Override
    public void close() {}
}